var lastViewLocation;
var lastViewName;
var tmp;
var currentViewLocation = "/adm/home";
var currentViewName = "我的桌面";
var selectView = function (viewLocation, viewName) {
    $('#contentArticle').load(viewLocation);
    $('#viewNameSpan').text(viewName);
    if (currentViewLocation !== viewLocation) {
        lastViewLocation = currentViewLocation;
        lastViewName = currentViewName;
        currentViewLocation = viewLocation;
        currentViewName = viewName;
    }
};
var backView = function () {
    $('#contentArticle').load(lastViewLocation);
    $('#viewNameSpan').text(lastViewName);
    tmp = currentViewLocation;
    currentViewLocation = lastViewLocation;
    lastViewLocation = tmp;
    tmp = currentViewName;
    currentViewName = lastViewName;
    lastViewName = tmp;

};
var research = function (url, viewName) {
    var keyword = $('#keyword').val();
    if ('' !== keyword.trim()) {
        selectView(url + "?keyword=" + keyword.trim() + "&pageNum=1", viewName);
    } else {
        selectView(url + "?&pageNum=1", viewName);
    }
};